package com.ledim.db.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.ledim.bean.ChatRoomBean;
import com.ledim.bean.LedimChoiceCardBean;
import com.ledim.bean.LedimPicBean;
import com.ledim.bean.LedimSearchRecord;
import com.ledim.bean.LedimUserBean;

import com.ledim.db.dao.ChatRoomBeanDao;
import com.ledim.db.dao.LedimChoiceCardBeanDao;
import com.ledim.db.dao.LedimPicBeanDao;
import com.ledim.db.dao.LedimSearchRecordDao;
import com.ledim.db.dao.LedimUserBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig chatRoomBeanDaoConfig;
    private final DaoConfig ledimChoiceCardBeanDaoConfig;
    private final DaoConfig ledimPicBeanDaoConfig;
    private final DaoConfig ledimSearchRecordDaoConfig;
    private final DaoConfig ledimUserBeanDaoConfig;

    private final ChatRoomBeanDao chatRoomBeanDao;
    private final LedimChoiceCardBeanDao ledimChoiceCardBeanDao;
    private final LedimPicBeanDao ledimPicBeanDao;
    private final LedimSearchRecordDao ledimSearchRecordDao;
    private final LedimUserBeanDao ledimUserBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        chatRoomBeanDaoConfig = daoConfigMap.get(ChatRoomBeanDao.class).clone();
        chatRoomBeanDaoConfig.initIdentityScope(type);

        ledimChoiceCardBeanDaoConfig = daoConfigMap.get(LedimChoiceCardBeanDao.class).clone();
        ledimChoiceCardBeanDaoConfig.initIdentityScope(type);

        ledimPicBeanDaoConfig = daoConfigMap.get(LedimPicBeanDao.class).clone();
        ledimPicBeanDaoConfig.initIdentityScope(type);

        ledimSearchRecordDaoConfig = daoConfigMap.get(LedimSearchRecordDao.class).clone();
        ledimSearchRecordDaoConfig.initIdentityScope(type);

        ledimUserBeanDaoConfig = daoConfigMap.get(LedimUserBeanDao.class).clone();
        ledimUserBeanDaoConfig.initIdentityScope(type);

        chatRoomBeanDao = new ChatRoomBeanDao(chatRoomBeanDaoConfig, this);
        ledimChoiceCardBeanDao = new LedimChoiceCardBeanDao(ledimChoiceCardBeanDaoConfig, this);
        ledimPicBeanDao = new LedimPicBeanDao(ledimPicBeanDaoConfig, this);
        ledimSearchRecordDao = new LedimSearchRecordDao(ledimSearchRecordDaoConfig, this);
        ledimUserBeanDao = new LedimUserBeanDao(ledimUserBeanDaoConfig, this);

        registerDao(ChatRoomBean.class, chatRoomBeanDao);
        registerDao(LedimChoiceCardBean.class, ledimChoiceCardBeanDao);
        registerDao(LedimPicBean.class, ledimPicBeanDao);
        registerDao(LedimSearchRecord.class, ledimSearchRecordDao);
        registerDao(LedimUserBean.class, ledimUserBeanDao);
    }
    
    public void clear() {
        chatRoomBeanDaoConfig.getIdentityScope().clear();
        ledimChoiceCardBeanDaoConfig.getIdentityScope().clear();
        ledimPicBeanDaoConfig.getIdentityScope().clear();
        ledimSearchRecordDaoConfig.getIdentityScope().clear();
        ledimUserBeanDaoConfig.getIdentityScope().clear();
    }

    public ChatRoomBeanDao getChatRoomBeanDao() {
        return chatRoomBeanDao;
    }

    public LedimChoiceCardBeanDao getLedimChoiceCardBeanDao() {
        return ledimChoiceCardBeanDao;
    }

    public LedimPicBeanDao getLedimPicBeanDao() {
        return ledimPicBeanDao;
    }

    public LedimSearchRecordDao getLedimSearchRecordDao() {
        return ledimSearchRecordDao;
    }

    public LedimUserBeanDao getLedimUserBeanDao() {
        return ledimUserBeanDao;
    }

}
